var os = require('os');
module.exports = {
    ipv4:function() {
        var network = os.networkInterfaces();
        console.log(network);
        for(var i in network){
            var n = network[i];
            for(var j in n){
                var ip = n[j];
                if(ip.family != 'IPv4'){
                    continue;
                }
                if(ip.address == '127.0.0.1'){
                    continue;
                }
                return ip.address;
            }
        }
    }
};